package edu.ynmd.cms.Dao;

import edu.ynmd.cms.model.Course;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface CourseDao extends JpaRepository<Course,String> {
    @Query("select c from Course c where c.book =:bookid")
    public List<Course> getCourseListByBook(@Param("bookid") String book);
}
